home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack99 / windows98_bof.txt < prev    next >
Encoding:
Internet Message Format  |  1999-03-24  |  4.8 KB

  1. Date: Mon, 15 Feb 1999 17:59:13 -0500
  2. From: Ervin Fried <ervin@NAME.NET>
  3. To: BUGTRAQ@netspace.org
  4. Subject: Re: Win98 Buffer Overflow (File attached)
  5.  
  6. my .02$:
  7. Explorer has bugs in handling files with pathname longer than or
  8. equal to the documented max and files with components
  9. that exceed other maximums.
  10.  
  11. CreateFile(...) seem to not parse the name to ensure that
  12.  
  13. when network is involved, even shorter paths can cause problems.
  14. Any shell extensions that you have installed may crash explorer
  15. if they have bugs.
  16.  
  17. see below.
  18.  
  19. Scott wrote:
  20. >
  21. > This file did crash explorer when I right clicked on it, but it didn't crash
  22. > until after the menu came up and I clicked off of it.  I was surprised the
  23. > menu even loaded this time.
  24.  
  25. The windows headers define MAX_PATH as:
  26.  
  27. WINDEF.H(44): #define MAX_PATH     260
  28.  
  29. STDLIB.H(145):
  30. #define _MAX_PATH   260 /* max. length of full pathname */
  31. #define _MAX_DRIVE  3   /* max. length of drive component */
  32. #define _MAX_DIR    256 /* max. length of path component */
  33. #define _MAX_FNAME  256 /* max. length of file name component */
  34. #define _MAX_EXT    256 /* max. length of extension component */
  35.  
  36.  
  37. What i experienced:
  38.  
  39. systems:
  40. [
  41. win95 original, most patches/upgrades:
  42. win98, all updates
  43. ]
  44. your attached file had a length of 239, most chars 0xA0 (chr(160)).
  45.  
  46.  
  47. Both handled the file OK, as long the complete name (file + path) was
  48. less than 260 chars and the file was on a local drive.
  49.  
  50. as soon as i tried copying etc to a path that would yield a filepath
  51. longer than 260, i got errors (various different one, no one
  52. indicating the real problem, ie MAX_PATH exceeded)
  53.  
  54.  
  55. creating files via the api, works until the path is 259 chars,
  56. ( 260 seems to be max length of the buffer, including terminating '\0')
  57.  
  58. on both, explorer rename edit box has a max, set so that total path is
  59. less than  254 chars (so 250 chars in root, but 246 chars in c:\temp )
  60.  
  61. on both, std file open dialog has the same 254 chars total path limit
  62. (which by the way is in Comdlg32.dll and not in the comdlg32.ocx
  63. shipped with VB, which is a wrapper aroung former)
  64.  
  65. on both, std file save edit box will sillently truncate to a total of
  66. 259 chars (ie 251 for filename in c:\temp\ ). the edit box has a limit
  67. of 259 chars.
  68.  
  69. on win95, right click works for files with extension for
  70. paths up to 259 chars
  71.  
  72. on win98, right click menu does not open for path greater that 122 (???)
  73.  
  74. on both, explorer crashes (without re-starting though) in
  75. WZSHLEXT.DLL when right-click on a file with a total path of
  76. exactly 259 chars (wzshlext.dll is a shell extension that is installed
  77. by WinZip)
  78.  
  79. on both, explorer crashes in kernel32.dll on right click on a file
  80. with no extension with a 256 or 257 or 258 path
  81.  
  82.  
  83. other problems:
  84.  
  85. network:
  86.  
  87. Using Win98 trying to handle the file on the root of a Win95 share
  88.  
  89. - share mapped as drive:
  90.         explorer didn't crash
  91.         right click didn't open context menu
  92.         File menu didn't open
  93.         attempts to rename failed
  94. [
  95.  with error 1026, which i cant find in header files,
  96.  //  The filename or extension is too long.
  97.  #define ERROR_FILENAME_EXCED_RANGE       206L
  98. ]
  99.  
  100. - accessed via Network Neighbourhood:
  101.      crashed once on right click, then i couldn't reproduce.
  102.      other attempt got results same as above
  103.  
  104.  
  105.  
  106. > Explorer 'resets' the system tray, causing ICQ, my modem dialer icon, etc.
  107. > to be hidden.  The Volume Control Icon either remained, or was reloaded.
  108.  
  109. That's another issue. see MSJ February 1999, page 62
  110.  
  111.  
  112. >     -Scott Campbell
  113.  
  114. Ervin Fried
  115.  
  116. ----------------------------------------------------------------------------
  117.  
  118. Date: Mon, 15 Feb 1999 22:43:55 -0500
  119. From: Ervin Fried <ervin@NAME.NET>
  120. To: BUGTRAQ@netspace.org
  121. Subject: Re: Win98 Buffer Overflow (File attached)
  122.  
  123. > CreateFile(...) seem to not parse the name to ensure that
  124.  
  125. hit the send button to early. please ignore this half sentence.
  126.  
  127. the call seems to work ok.
  128.  
  129.  
  130. Ervin Fried
  131.  
  132. ----------------------------------------------------------------------------
  133.  
  134. Date: Tue, 16 Feb 1999 10:15:44 -0800
  135. From: Aleph One <aleph1@UNDERGROUND.ORG>
  136. To: BUGTRAQ@netspace.org
  137. Subject: Re: Win98 Buffer Overflow
  138.  
  139. Summary of some of the responces:
  140.  
  141. Also crashes:
  142.  
  143. BeMail (ships with BeOSE)
  144. rik <erik@catv6219.extern.kun.nl>
  145.  
  146. Lotus Notes (when you try visualize it. you can't detach
  147. the document, but you can choose Launch and WordPad won't cash)
  148. Bertrand FREMONT <bfremont@danka.fr>
  149.  
  150. Pine 3.0 under HP-UX A.09.07 A 9000/712 
  151. Rohit Singh <svsingh@arp.iitkgp.ernet.in>
  152.  
  153. Outlook 98 under Windows NT 4.0 SP?
  154. Scott <smc@visuallink.com>
  155.  
  156. Not affected:
  157.  
  158. Windows NT SP4
  159. Bronislaw Kozicki <bronek@wpi.com.pl>
  160.  
  161. John D. Hardin <jhardin@wolfenet.com> reminds of of the procmail
  162. security filter page at
  163. http://www.wolfenet.com/~jhardin/procmail-security.html
  164.  
  165. --
  166. Aleph One / aleph1@underground.org
  167. http://underground.org/
  168. KeyID 1024/948FD6B5
  169. Fingerprint EE C9 E8 AA CB AF 09 61  8C 39 EA 47 A8 6A B8 01
  170.  
  171.